package com.example.qmt.advertising;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.example.qmt.MainActivity;
import com.example.qmt.R;
import com.example.qmt.TestActivity;
import com.example.qmt.databinding.ActivityAdvertisingBinding;
import com.google.android.material.floatingactionbutton.FloatingActionButton;

public class AdvertisingActivity extends AppCompatActivity {

    ActivityAdvertisingBinding advertisingBinding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        advertisingBinding = ActivityAdvertisingBinding.inflate(getLayoutInflater());
        setContentView(advertisingBinding.getRoot());

        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        advertisingBinding.advertisingRecyclerView.setLayoutManager(linearLayoutManager);
        advertisingBinding.advertisingRecyclerView.setAdapter(new AdvertisingAdapter(AdvertisingActivity.this));

        advertisingBinding.advertisingUser.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(AdvertisingActivity.this, Advertising_User_Activity.class);
                startActivity(intent);
            }
        });


        advertisingBinding.fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(AdvertisingActivity.this, ReleaseActivity.class);
                startActivity(intent);
            }
        });

    }
}